package net.pimpas.persistence.hibernate.scanner;

import java.util.ArrayList;
import java.util.List;

import net.pimpas.core.scanner.Scanner;
import net.pimpas.core.scanner.exception.ScannerException;
import net.pimpas.persistence.hibernate.visitor.FilterVisitor;

public class HibernateFilterScanner implements Scanner<Class> {
	
	private List<Class> result;

	public String getName() {
		return this.getClass().getSimpleName();
	}

	public List<Class> getResult() {
		return this.result;
	}

	public void scan() throws ScannerException {
		this.setResult(new ArrayList<Class>());
		this.getResult().addAll(FilterVisitor.clazzs);
		FilterVisitor.clazzs.clear();
	}

	public void setResult(List<Class> result) {
		this.result = result;
	}
}